package io.renren.modules.business.dao;

import io.renren.modules.business.entity.BusAssessmentScoreEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 打分表实体类
 * 
 * @author liao mengqing
 */
@Mapper
public interface BusAssessmentScoreDao extends BaseMapper<BusAssessmentScoreEntity> {
    /**
     * 查询未打分的开发者信息列表
     * @return
     */
    List<Map<String, Object>> developerList();

    /**
     * 根据用户名查询未被打分的开发者Id
     * @param userName
     * @return
     */
    List<Map<String, Object>> developerInfo(String userName);

    /**
     * 查询团队负责项目信息
     * @param teamId
     * @return
     */
    List<String> teamProject(Long teamId);

    /**
     * 获取开发者所参与项目的分数
     * @param developerId
     * @return
     */
    Double projectAverage(Long developerId);

    /**
     * 查询开发者是否为团队队长
     * @param developerId
     * @return
     */
    int teamLeader(Long developerId);

    void developerScore(Long recordId, Double score, Double proAverage, Double teamAverage);

    void developerRecord(Long developerId, Double score);

    Long seleRecord(Long developerId);
}
